Repository navigation
fix(tui): bidirectional Tab, Ctrl+Q detaches, remove broken Ctrl+T - #925
Conversation
serve no longer pre-creates empty bash sessions for every agent. Sessions are created on-demand by genie spawn. TUI Enter handler spawns the agent if not running, then attaches.
- Tab toggles between nav and terminal (bidirectional, was one-way) - Ctrl+Q detaches from TUI (was killing session) - Remove Ctrl+T send-keys to nested tmux (broken, will be reimplemented) - Remove startAgentTmuxServer from serve (no empty sessions) - Enter spawns agent if not running, then attaches
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors agent session management by removing pre-emptive tmux session creation in favor of on-demand spawning. It also updates TUI keybindings to allow toggling between panes and changes the exit behavior to detach the client instead of killing the session. A review comment suggests improving error handling during the keybinding setup to prevent silent failures that could complicate debugging.
| for (const cmd of bindings) { | ||
| try { | ||
| execSync(tuiTmux(cmd), { stdio: 'ignore' }); | ||
| } catch {} |
There was a problem hiding this comment.
Silently catching and ignoring errors can make debugging difficult if a tmux command fails unexpectedly. Consider logging the error at a debug level or adding a comment explaining why the error is intentionally ignored here.
} catch (error) {
// Consider logging the error here for debugging purposes.
}There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57e1f1381a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // 2. Report agent tmux server state (don't create empty sessions — | ||
| // sessions are created on-demand by `genie spawn`). | ||
| const sessions = listAgentSessions(); |
There was a problem hiding this comment.
Start agent tmux server with config before on-demand sessions
This change stops initializing tmux -L genie via genieTmuxConf() at serve startup, so a fresh run with no sessions now relies on later on-demand creation. In that flow, the TUI attach path calls ensureAgentSession in src/tui/tmux.ts, which creates the first server with bare tmux -L genie new-session (no -f), so ~/.genie/tmux.conf/the shipped config is never loaded for that server process. The result is inconsistent tmux behavior (status/options/keybindings) until the server is manually killed and restarted with config.
Useful? React with 👍 / 👎.
Follow-up to #924. Tab was one-way, Ctrl+Q killed session instead of detaching.